<script setup>
  import {reactive} from "vue";
  import axios from "axios";

  let data = reactive({
    flow:[], // 存储流程图数据
    dto:{page:1,size:10}
  })

  function list() {
    axios.post('/flow/flow/list',data.dto).then(resp=>{
      data.flow = resp.data.records
      data.dto.page = resp.data.current
      data.dto.size = resp.data.size
    })
  }
  list();

  function editLCT(id) {
    window.open('http://127.0.0.1/flow/warm-flow-ui/index.html?id='+id)
  }
</script>

<template>
  <h3>流程管理</h3>
  <el-table :data="data.flow">
    <el-table-column label="id" prop="id" />
    <el-table-column label="流程编码" prop="flowCode" />
    <el-table-column label="流程名称" prop="flowName" />
    <el-table-column label="是否发布" prop="isPublish" />
    <el-table-column label="操作">
      <template #default="s">
        <el-button @click="editLCT(s.row.id)">编辑流程图</el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

<style scoped>

</style>
